home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / misc / VMM_src.lha / VMM / parthandler.asm < prev    next >
Encoding:
Assembly Source File  |  1995-12-16  |  2.1 KB  |  62 lines

  1.                     INCLUDE   "exec/funcdef.i"
  2.                     INCLUDE   "exec/exec_lib.i"
  3.                     INCLUDE   "exec/ables.i"
  4.                     INCLUDE   "exec/ports.i"
  5.                     INCLUDE   "exec/io.i"
  6.                     INCLUDE   "shared_defs.i"
  7.                     INCLUDE   "macros.i"
  8.  
  9. * $Id: parthandler.asm,v 3.5 95/12/16 18:36:32 Martin_Apel Exp $
  10.                     XDEF      _PartHandler
  11.  
  12.                     XREF      _OrigBeginIO
  13.                     XREF      _PrePagerTask
  14.                     XREF      _PrePagerPort
  15.                     XREF      _VirtAddrStart
  16.                     XREF      _VirtAddrEnd
  17.                     XREF      _FileHandlerProcess
  18.                     XREF      _CurrentConfig
  19.  
  20.                     SECTION   CODE
  21.  
  22.                     * Invoked with
  23.                     * a1: IORequest
  24.                     * a6: DevicePointer
  25.  
  26. _PartHandler:       * Is io_Data in Virtual memory ?
  27.  
  28.                     move.l    IO_DATA(a1),d0
  29.                     IN_VM     d0,NoVirtMem
  30.  
  31.                     PRINT_DEB "BeginIO: IO to virtual memory. Addr: %lx",IO_DATA(a1)
  32.  
  33.                     * yes it is
  34.                     * Is Prepager requesting this IO ?
  35.                     move.l    4,a0
  36.                     move.l    ThisTask(a0),d0
  37.                     cmp.l     _PrePagerTask,d0
  38.                     beq       PrePagerIO
  39.                     lea       _CurrentConfig,a0
  40.                     tst.w     PageDev(a0)
  41.                     bne       prepage                         ; not PD_FILE
  42.                     cmp.l     _FileHandlerProcess,d0
  43.                     beq       FileHandlerIO
  44.  
  45.                     * make the application wait for the reply
  46. prepage             move.l    a6,-(sp)
  47.                     bclr.b    #IOB_QUICK,IO_FLAGS(a1)
  48.                     move.l    4,a6
  49.                     move.l    _PrePagerPort,a0
  50.                     jsr       _LVOPutMsg(a6)
  51.                     move.l    (sp)+,a6
  52.                     rts
  53.  
  54.                     ALIGN_LONG
  55.  
  56. FileHandlerIO       PRINT_DEB "FileHandlerIO"
  57. PrePagerIO          
  58. NoVirtMem           move.l    _OrigBeginIO,a0
  59.                     jmp       (a0)
  60.  
  61.                     end
  62.